\hypertarget{class_gameloop}{\section{Gameloop Class Reference}
\label{class_gameloop}\index{Gameloop@{Gameloop}}
}


{\ttfamily \#include $<$Gameloop.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_gameloop_a18f9a1686565e206b40718ed787aeb97}{Gameloop} ()
\item 
virtual \hyperlink{class_gameloop_ac0aff9533f00b23557a7d7b348b95007}{$\sim$\-Gameloop} ()
\item 
void \hyperlink{class_gameloop_aaf57f38f17343877c7b4bd6a75ef3a9f}{game\-Loop} ()
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
long \hyperlink{class_gameloop_a0004bb5d123525c760e16535c424d50b}{get\-Time} ()
\item 
void \hyperlink{class_gameloop_a91d555830ff70f604077ec1600bf9a90}{stop\-Loop} ()
\item 
void \hyperlink{class_gameloop_a363757057c85482cecc4f72da4084dba}{update} ()
\item 
void \hyperlink{class_gameloop_a6f65b70ec85e73fb4467e7eb34bc4849}{render} (float interpolation)
\item 
void \hyperlink{class_gameloop_a1fc46b06b36562f628e0d8f051c8b596}{handle\-Input} ()
\item 
void \hyperlink{class_gameloop_a7c190e11c2ed38b078519efe7e4d06d2}{change\-State} (\hyperlink{class_state_machine}{State\-Machine} $\ast$level)
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_window}{Window} $\ast$ \hyperlink{class_gameloop_abf8e7512d69339437c10cfb24be80de2}{window}
\item 
long \hyperlink{class_gameloop_a301c183e1c307488fd2da2b0a19f7199}{last\-Frame}
\item 
bool \hyperlink{class_gameloop_a9415733a7e81365c8b5b8ee5b1519ffb}{running}
\item 
\hyperlink{class_state_machine}{State\-Machine} $\ast$ \hyperlink{class_gameloop_af40baffa9da33a7f8d4e480244d74e74}{current\-State}
\item 
\hyperlink{class_state_manager}{State\-Manager} $\ast$ \hyperlink{class_gameloop_a2a19e25d1250c978750fadfe74cfde57}{manager}
\end{DoxyCompactItemize}
\subsection*{Static Private Attributes}
\begin{DoxyCompactItemize}
\item 
static const double \hyperlink{class_gameloop_ae2dd6353df16267b2e9cbc845118721e}{F\-P\-S} = 60
\item 
static int \hyperlink{class_gameloop_ae4cbe1048a5e5f398271d0d998b45028}{timer} = 0
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{_gameloop_8h}{Gameloop.\-h}

Created on\-: 2-\/dec.-\/2013 Author\-: Axel Class that handles the game loop 

Definition at line 23 of file Gameloop.\-h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_gameloop_a18f9a1686565e206b40718ed787aeb97}{\index{Gameloop@{Gameloop}!Gameloop@{Gameloop}}
\index{Gameloop@{Gameloop}!Gameloop@{Gameloop}}
\subsubsection[{Gameloop}]{\setlength{\rightskip}{0pt plus 5cm}Gameloop\-::\-Gameloop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_gameloop_a18f9a1686565e206b40718ed787aeb97}
constructor and destructor 

Definition at line 20 of file Gameloop.\-cpp.



References current\-State, State\-Manager\-::initialise\-State(), last\-Frame, manager, N\-U\-L\-L, running, and window.

\hypertarget{class_gameloop_ac0aff9533f00b23557a7d7b348b95007}{\index{Gameloop@{Gameloop}!$\sim$\-Gameloop@{$\sim$\-Gameloop}}
\index{$\sim$\-Gameloop@{$\sim$\-Gameloop}!Gameloop@{Gameloop}}
\subsubsection[{$\sim$\-Gameloop}]{\setlength{\rightskip}{0pt plus 5cm}Gameloop\-::$\sim$\-Gameloop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_gameloop_ac0aff9533f00b23557a7d7b348b95007}


Definition at line 33 of file Gameloop.\-cpp.



References manager, and window.



\subsection{Member Function Documentation}
\hypertarget{class_gameloop_a7c190e11c2ed38b078519efe7e4d06d2}{\index{Gameloop@{Gameloop}!change\-State@{change\-State}}
\index{change\-State@{change\-State}!Gameloop@{Gameloop}}
\subsubsection[{change\-State}]{\setlength{\rightskip}{0pt plus 5cm}void Gameloop\-::change\-State (
\begin{DoxyParamCaption}
\item[{{\bf State\-Machine} $\ast$}]{level}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_a7c190e11c2ed38b078519efe7e4d06d2}
change the state 

Definition at line 133 of file Gameloop.\-cpp.



References current\-State.



Referenced by update().

\hypertarget{class_gameloop_aaf57f38f17343877c7b4bd6a75ef3a9f}{\index{Gameloop@{Gameloop}!game\-Loop@{game\-Loop}}
\index{game\-Loop@{game\-Loop}!Gameloop@{Gameloop}}
\subsubsection[{game\-Loop}]{\setlength{\rightskip}{0pt plus 5cm}void Gameloop\-::game\-Loop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_gameloop_aaf57f38f17343877c7b4bd6a75ef3a9f}
the core gameloop function 

Definition at line 40 of file Gameloop.\-cpp.



References Window\-::close\-Window(), F\-P\-S, get\-Time(), handle\-Input(), render(), running, timer, update(), and window.



Referenced by main().

\hypertarget{class_gameloop_a0004bb5d123525c760e16535c424d50b}{\index{Gameloop@{Gameloop}!get\-Time@{get\-Time}}
\index{get\-Time@{get\-Time}!Gameloop@{Gameloop}}
\subsubsection[{get\-Time}]{\setlength{\rightskip}{0pt plus 5cm}long Gameloop\-::get\-Time (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_a0004bb5d123525c760e16535c424d50b}
get the time 

Definition at line 91 of file Gameloop.\-cpp.



Referenced by game\-Loop().

\hypertarget{class_gameloop_a1fc46b06b36562f628e0d8f051c8b596}{\index{Gameloop@{Gameloop}!handle\-Input@{handle\-Input}}
\index{handle\-Input@{handle\-Input}!Gameloop@{Gameloop}}
\subsubsection[{handle\-Input}]{\setlength{\rightskip}{0pt plus 5cm}void Gameloop\-::handle\-Input (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_a1fc46b06b36562f628e0d8f051c8b596}
handle input 

Definition at line 125 of file Gameloop.\-cpp.



References current\-State, Window\-::get\-Window(), State\-Machine\-::handle\-Input(), Window\-::handle\-Input(), and window.



Referenced by game\-Loop().

\hypertarget{class_gameloop_a6f65b70ec85e73fb4467e7eb34bc4849}{\index{Gameloop@{Gameloop}!render@{render}}
\index{render@{render}!Gameloop@{Gameloop}}
\subsubsection[{render}]{\setlength{\rightskip}{0pt plus 5cm}void Gameloop\-::render (
\begin{DoxyParamCaption}
\item[{float}]{interpolation}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_a6f65b70ec85e73fb4467e7eb34bc4849}
render the game 

Definition at line 102 of file Gameloop.\-cpp.



References current\-State, State\-Machine\-::render\-Game(), Window\-::swap\-Buffer(), and window.



Referenced by game\-Loop().

\hypertarget{class_gameloop_a91d555830ff70f604077ec1600bf9a90}{\index{Gameloop@{Gameloop}!stop\-Loop@{stop\-Loop}}
\index{stop\-Loop@{stop\-Loop}!Gameloop@{Gameloop}}
\subsubsection[{stop\-Loop}]{\setlength{\rightskip}{0pt plus 5cm}void Gameloop\-::stop\-Loop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_a91d555830ff70f604077ec1600bf9a90}
stop the loop 

Definition at line 97 of file Gameloop.\-cpp.



References running.

\hypertarget{class_gameloop_a363757057c85482cecc4f72da4084dba}{\index{Gameloop@{Gameloop}!update@{update}}
\index{update@{update}!Gameloop@{Gameloop}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void Gameloop\-::update (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_a363757057c85482cecc4f72da4084dba}
update the game 

Definition at line 115 of file Gameloop.\-cpp.



References State\-Manager\-::call\-States(), change\-State(), current\-State, State\-Machine\-::get\-Key\-Code(), manager, State\-Machine\-::state\-Changer(), timer, and State\-Machine\-::update\-Game().



Referenced by game\-Loop().



\subsection{Member Data Documentation}
\hypertarget{class_gameloop_af40baffa9da33a7f8d4e480244d74e74}{\index{Gameloop@{Gameloop}!current\-State@{current\-State}}
\index{current\-State@{current\-State}!Gameloop@{Gameloop}}
\subsubsection[{current\-State}]{\setlength{\rightskip}{0pt plus 5cm}{\bf State\-Machine}$\ast$ Gameloop\-::current\-State\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_af40baffa9da33a7f8d4e480244d74e74}
holding the currentstate and the manager 

Definition at line 45 of file Gameloop.\-h.



Referenced by change\-State(), Gameloop(), handle\-Input(), render(), and update().

\hypertarget{class_gameloop_ae2dd6353df16267b2e9cbc845118721e}{\index{Gameloop@{Gameloop}!F\-P\-S@{F\-P\-S}}
\index{F\-P\-S@{F\-P\-S}!Gameloop@{Gameloop}}
\subsubsection[{F\-P\-S}]{\setlength{\rightskip}{0pt plus 5cm}const double Gameloop\-::\-F\-P\-S = 60\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [private]}}}\label{class_gameloop_ae2dd6353df16267b2e9cbc845118721e}
the fps and timer 

Definition at line 41 of file Gameloop.\-h.



Referenced by game\-Loop().

\hypertarget{class_gameloop_a301c183e1c307488fd2da2b0a19f7199}{\index{Gameloop@{Gameloop}!last\-Frame@{last\-Frame}}
\index{last\-Frame@{last\-Frame}!Gameloop@{Gameloop}}
\subsubsection[{last\-Frame}]{\setlength{\rightskip}{0pt plus 5cm}long Gameloop\-::last\-Frame\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_a301c183e1c307488fd2da2b0a19f7199}
simple vars 

Definition at line 37 of file Gameloop.\-h.



Referenced by Gameloop().

\hypertarget{class_gameloop_a2a19e25d1250c978750fadfe74cfde57}{\index{Gameloop@{Gameloop}!manager@{manager}}
\index{manager@{manager}!Gameloop@{Gameloop}}
\subsubsection[{manager}]{\setlength{\rightskip}{0pt plus 5cm}{\bf State\-Manager}$\ast$ Gameloop\-::manager\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_a2a19e25d1250c978750fadfe74cfde57}


Definition at line 46 of file Gameloop.\-h.



Referenced by Gameloop(), update(), and $\sim$\-Gameloop().

\hypertarget{class_gameloop_a9415733a7e81365c8b5b8ee5b1519ffb}{\index{Gameloop@{Gameloop}!running@{running}}
\index{running@{running}!Gameloop@{Gameloop}}
\subsubsection[{running}]{\setlength{\rightskip}{0pt plus 5cm}bool Gameloop\-::running\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_a9415733a7e81365c8b5b8ee5b1519ffb}


Definition at line 38 of file Gameloop.\-h.



Referenced by Gameloop(), game\-Loop(), and stop\-Loop().

\hypertarget{class_gameloop_ae4cbe1048a5e5f398271d0d998b45028}{\index{Gameloop@{Gameloop}!timer@{timer}}
\index{timer@{timer}!Gameloop@{Gameloop}}
\subsubsection[{timer}]{\setlength{\rightskip}{0pt plus 5cm}int Gameloop\-::timer = 0\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [private]}}}\label{class_gameloop_ae4cbe1048a5e5f398271d0d998b45028}


Definition at line 42 of file Gameloop.\-h.



Referenced by game\-Loop(), and update().

\hypertarget{class_gameloop_abf8e7512d69339437c10cfb24be80de2}{\index{Gameloop@{Gameloop}!window@{window}}
\index{window@{window}!Gameloop@{Gameloop}}
\subsubsection[{window}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Window}$\ast$ Gameloop\-::window\hspace{0.3cm}{\ttfamily [private]}}}\label{class_gameloop_abf8e7512d69339437c10cfb24be80de2}
the game window 

Definition at line 34 of file Gameloop.\-h.



Referenced by Gameloop(), game\-Loop(), handle\-Input(), render(), and $\sim$\-Gameloop().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
C\-:/\-Users/\-Axel/\-Desktop/informatica/\-Projects/\-Workspace C++/\-Game Engine/src/\-Core\-Systems/\hyperlink{_gameloop_8h}{Gameloop.\-h}\item 
C\-:/\-Users/\-Axel/\-Desktop/informatica/\-Projects/\-Workspace C++/\-Game Engine/src/\-Core\-Systems/\hyperlink{_gameloop_8cpp}{Gameloop.\-cpp}\end{DoxyCompactItemize}
